package com.sc.springboot.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.util.Date;
import java.util.List;

import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 
 * </p>
 *
 * @author romeo
 * @since 2025-09-20 03:18:17
 */
@Getter
@Setter
@TableName("post")
public class Post {

    @TableId(value = "post_id", type = IdType.AUTO)
    private Integer postId;

    @TableField("user_id")
    private Integer userId;

    /**
     * 内容
     */
    @TableField("content")
    private String content;

    /**
     * 板块ID
     */
    @TableField("type_id")
    private Integer typeId;

    /**
     * 图片URL（多图以逗号分隔）
     */
    @TableField("images")
    private String images;

    /**
     * 发布时间
     */
    @TableField("post_time")
    private Date postTime;

    /**
     * 点赞数
     */
    @TableField("likes")
    private Integer likes;

    //用户信息
    @TableField(exist = false)
    private Users users;

    //用户是否点赞
    @TableField(exist = false)
    private boolean userLiked;

    //评论数量
    @TableField(exist = false)
    private Integer commentCount;

    //用户是否关注
    @TableField(exist = false)
    private boolean userFollowed;

    //评论列表
    @TableField(exist = false)
    private List<Comment> commentList;


}